const fs = require("fs")
module.exports = (path)=>{
  return (req,res,next)=>{
    fs.readFile(path + req.url, "utf-8", (err, data)=>{
      if(err){
        next();
      }else{
        res.send(data);
      }
    })
  }
}